package buzhidao;
class Animal0{
    private String name;
    private int age;
    public String getName(){
        return name;
    }
    public void setName(String name){
        this.name=name;
    }
    public int getAge(){
        return age;
    }
    public void setAge(int age){
        this.age=age;
    }
}
    class Dogs extends Animal0{
        private String color;
        public String getcolor(){
            return color;
        }
        public void setcolor(String color){
            this.color=color;
        }
}

public class ExtendsTest2 {
    public static void main(String[]args){
        Dogs dog=new Dogs();
        dog.setName("金毛");
        dog.setAge(4);
        dog.setcolor("金黄色");
        System.out.println("名字："+dog.getName()+",年龄："+dog.getAge()+","+dog.getcolor());
    }
    
}
